﻿using Vin.Tool.Attributes;

namespace Vin.Extension.Framework.Monitor.Options;

[Option("VinMonitor")]
public class MonitorOption
{
    /// <summary>
    /// 启动的线程池
    /// </summary>
    public int ThreadSize { get; set; } = 1;

    /// <summary>
    /// 每个线程的批次大小
    /// </summary>
    public int BatchSize { get; set; } = 100;

    /// <summary>
    /// 等待秒数
    /// </summary>
    public int WaitSeconds { get; set; } = 5;

    /// <summary>
    /// 忽略记录请求日志的请求路径
    /// </summary>
    public List<string> IgnoreRequestPath { get; set; } =
        new()
        {
            "monitor/*"
            // "monitor/request-log/list", "monitor/request-log/query",
            // "monitor/operate-log/list", "monitor/operate-log/query",
            // "monitor/login-log/list"
        };

    /// <summary>
    /// 在线心跳间隔秒数
    /// </summary>
    public int OnlineHeartbeatSeconds { get; set; } = 10 * 60;

    /// <summary>
    /// 在线心跳后自动续约分钟数 （当前时间开始）
    /// </summary>
    public int OnlineHeartbeatRenewalMinutes { get; set; } = 1440;

    /// <summary>
    /// 默认往前查询多少天
    /// </summary>
    public int DefaultQueryDays { get; set; } = 3;

    /// <summary>
    /// 默认查询时间间隔天数
    /// </summary>
    public int DefaultQueryIntervalDays { get; set; } = 7;
}